3.1.54 \(\int \frac {a+b \tanh ^{-1}(c x)}{(d+c d x)^2} \, dx\) [54]

Optimal. Leaf size=57 \[ -\frac {b}{2 c d^2 (1+c x)}+\frac {b \tanh ^{-1}(c x)}{2 c d^2}-\frac {a+b \tanh ^{-1}(c x)}{c d^2 (1+c x)} \]

[Out]

-1/2*b/c/d^2/(c*x+1)+1/2*b*arctanh(c*x)/c/d^2+(-a-b*arctanh(c*x))/c/d^2/(c*x+1)

________________________________________________________________________________________

Rubi [A]
time = 0.03, antiderivative size = 57, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 4, integrand size = 17, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.235, Rules used = {6063, 641, 46, 213} \begin {gather*} -\frac {a+b \tanh ^{-1}(c x)}{c d^2 (c x+1)}-\frac {b}{2 c d^2 (c x+1)}+\frac {b \tanh ^{-1}(c x)}{2 c d^2} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(a + b*ArcTanh[c*x])/(d + c*d*x)^2,x]

[Out]

-1/2*b/(c*d^2*(1 + c*x)) + (b*ArcTanh[c*x])/(2*c*d^2) - (a + b*ArcTanh[c*x])/(c*d^2*(1 + c*x))

Rule 46

Int[((a_) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d*x
)^n, x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0] && ILtQ[m, 0] && IntegerQ[n] &&  !(IGtQ[n, 0] && Lt
Q[m + n + 2, 0])

Rule 213

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(-(Rt[-a, 2]*Rt[b, 2])^(-1))*ArcTanh[Rt[b, 2]*(x/Rt[-a, 2])]
, x] /; FreeQ[{a, b}, x] && NegQ[a/b] && (LtQ[a, 0] || GtQ[b, 0])

Rule 641

Int[((d_) + (e_.)*(x_))^(m_.)*((a_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[(d + e*x)^(m + p)*(a/d + (c/e)*x)^
p, x] /; FreeQ[{a, c, d, e, m, p}, x] && EqQ[c*d^2 + a*e^2, 0] && (IntegerQ[p] || (GtQ[a, 0] && GtQ[d, 0] && I
ntegerQ[m + p]))

Rule 6063

Int[((a_.) + ArcTanh[(c_.)*(x_)]*(b_.))*((d_) + (e_.)*(x_))^(q_.), x_Symbol] :> Simp[(d + e*x)^(q + 1)*((a + b
*ArcTanh[c*x])/(e*(q + 1))), x] - Dist[b*(c/(e*(q + 1))), Int[(d + e*x)^(q + 1)/(1 - c^2*x^2), x], x] /; FreeQ
[{a, b, c, d, e, q}, x] && NeQ[q, -1]

Rubi steps

\begin {align*} \int \frac {a+b \tanh ^{-1}(c x)}{(d+c d x)^2} \, dx &=-\frac {a+b \tanh ^{-1}(c x)}{c d^2 (1+c x)}+\frac {b \int \frac {1}{(d+c d x) \left (1-c^2 x^2\right )} \, dx}{d}\\ &=-\frac {a+b \tanh ^{-1}(c x)}{c d^2 (1+c x)}+\frac {b \int \frac {1}{\left (\frac {1}{d}-\frac {c x}{d}\right ) (d+c d x)^2} \, dx}{d}\\ &=-\frac {a+b \tanh ^{-1}(c x)}{c d^2 (1+c x)}+\frac {b \int \left (\frac {1}{2 d (1+c x)^2}-\frac {1}{2 d \left (-1+c^2 x^2\right )}\right ) \, dx}{d}\\ &=-\frac {b}{2 c d^2 (1+c x)}-\frac {a+b \tanh ^{-1}(c x)}{c d^2 (1+c x)}-\frac {b \int \frac {1}{-1+c^2 x^2} \, dx}{2 d^2}\\ &=-\frac {b}{2 c d^2 (1+c x)}+\frac {b \tanh ^{-1}(c x)}{2 c d^2}-\frac {a+b \tanh ^{-1}(c x)}{c d^2 (1+c x)}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.04, size = 64, normalized size = 1.12 \begin {gather*} \frac {-4 a-2 b-4 b \tanh ^{-1}(c x)-(b+b c x) \log (1-c x)+b \log (1+c x)+b c x \log (1+c x)}{4 c d^2 (1+c x)} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(a + b*ArcTanh[c*x])/(d + c*d*x)^2,x]

[Out]

(-4*a - 2*b - 4*b*ArcTanh[c*x] - (b + b*c*x)*Log[1 - c*x] + b*Log[1 + c*x] + b*c*x*Log[1 + c*x])/(4*c*d^2*(1 +
 c*x))

________________________________________________________________________________________

Maple [A]
time = 0.14, size = 73, normalized size = 1.28

method result size
derivativedivides \(\frac {-\frac {a}{d^{2} \left (c x +1\right )}-\frac {b \arctanh \left (c x \right )}{d^{2} \left (c x +1\right )}-\frac {b}{2 d^{2} \left (c x +1\right )}+\frac {b \ln \left (c x +1\right )}{4 d^{2}}-\frac {b \ln \left (c x -1\right )}{4 d^{2}}}{c}\) \(73\)
default \(\frac {-\frac {a}{d^{2} \left (c x +1\right )}-\frac {b \arctanh \left (c x \right )}{d^{2} \left (c x +1\right )}-\frac {b}{2 d^{2} \left (c x +1\right )}+\frac {b \ln \left (c x +1\right )}{4 d^{2}}-\frac {b \ln \left (c x -1\right )}{4 d^{2}}}{c}\) \(73\)
risch \(-\frac {b \ln \left (c x +1\right )}{2 c \,d^{2} \left (c x +1\right )}-\frac {\ln \left (c x -1\right ) b c x -\ln \left (-c x -1\right ) b c x +b \ln \left (c x -1\right )-b \ln \left (-c x -1\right )-2 b \ln \left (-c x +1\right )+4 a +2 b}{4 d^{2} \left (c x +1\right ) c}\) \(96\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*arctanh(c*x))/(c*d*x+d)^2,x,method=_RETURNVERBOSE)

[Out]

1/c*(-a/d^2/(c*x+1)-b/d^2*arctanh(c*x)/(c*x+1)-1/2*b/d^2/(c*x+1)+1/4*b/d^2*ln(c*x+1)-1/4*b/d^2*ln(c*x-1))

________________________________________________________________________________________

Maxima [A]
time = 0.26, size = 96, normalized size = 1.68 \begin {gather*} -\frac {1}{4} \, {\left (c {\left (\frac {2}{c^{3} d^{2} x + c^{2} d^{2}} - \frac {\log \left (c x + 1\right )}{c^{2} d^{2}} + \frac {\log \left (c x - 1\right )}{c^{2} d^{2}}\right )} + \frac {4 \, \operatorname {artanh}\left (c x\right )}{c^{2} d^{2} x + c d^{2}}\right )} b - \frac {a}{c^{2} d^{2} x + c d^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*arctanh(c*x))/(c*d*x+d)^2,x, algorithm="maxima")

[Out]

-1/4*(c*(2/(c^3*d^2*x + c^2*d^2) - log(c*x + 1)/(c^2*d^2) + log(c*x - 1)/(c^2*d^2)) + 4*arctanh(c*x)/(c^2*d^2*
x + c*d^2))*b - a/(c^2*d^2*x + c*d^2)

________________________________________________________________________________________

Fricas [A]
time = 0.36, size = 49, normalized size = 0.86 \begin {gather*} \frac {{\left (b c x - b\right )} \log \left (-\frac {c x + 1}{c x - 1}\right ) - 4 \, a - 2 \, b}{4 \, {\left (c^{2} d^{2} x + c d^{2}\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*arctanh(c*x))/(c*d*x+d)^2,x, algorithm="fricas")

[Out]

1/4*((b*c*x - b)*log(-(c*x + 1)/(c*x - 1)) - 4*a - 2*b)/(c^2*d^2*x + c*d^2)

________________________________________________________________________________________

Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 95 vs. \(2 (46) = 92\).
time = 0.71, size = 95, normalized size = 1.67 \begin {gather*} \begin {cases} - \frac {2 a}{2 c^{2} d^{2} x + 2 c d^{2}} + \frac {b c x \operatorname {atanh}{\left (c x \right )}}{2 c^{2} d^{2} x + 2 c d^{2}} - \frac {b \operatorname {atanh}{\left (c x \right )}}{2 c^{2} d^{2} x + 2 c d^{2}} - \frac {b}{2 c^{2} d^{2} x + 2 c d^{2}} & \text {for}\: c \neq 0 \\\frac {a x}{d^{2}} & \text {otherwise} \end {cases} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*atanh(c*x))/(c*d*x+d)**2,x)

[Out]

Piecewise((-2*a/(2*c**2*d**2*x + 2*c*d**2) + b*c*x*atanh(c*x)/(2*c**2*d**2*x + 2*c*d**2) - b*atanh(c*x)/(2*c**
2*d**2*x + 2*c*d**2) - b/(2*c**2*d**2*x + 2*c*d**2), Ne(c, 0)), (a*x/d**2, True))

________________________________________________________________________________________

Giac [A]
time = 0.42, size = 63, normalized size = 1.11 \begin {gather*} \frac {1}{4} \, c {\left (\frac {{\left (c x - 1\right )} b \log \left (-\frac {c x + 1}{c x - 1}\right )}{{\left (c x + 1\right )} c^{2} d^{2}} + \frac {{\left (c x - 1\right )} {\left (2 \, a + b\right )}}{{\left (c x + 1\right )} c^{2} d^{2}}\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*arctanh(c*x))/(c*d*x+d)^2,x, algorithm="giac")

[Out]

1/4*c*((c*x - 1)*b*log(-(c*x + 1)/(c*x - 1))/((c*x + 1)*c^2*d^2) + (c*x - 1)*(2*a + b)/((c*x + 1)*c^2*d^2))

________________________________________________________________________________________

Mupad [B]
time = 1.07, size = 45, normalized size = 0.79 \begin {gather*} -\frac {b\,\mathrm {atanh}\left (c\,x\right )-c\,\left (2\,a\,x+b\,x+b\,x\,\mathrm {atanh}\left (c\,x\right )\right )}{2\,x\,c^2\,d^2+2\,c\,d^2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + b*atanh(c*x))/(d + c*d*x)^2,x)

[Out]

-(b*atanh(c*x) - c*(2*a*x + b*x + b*x*atanh(c*x)))/(2*c*d^2 + 2*c^2*d^2*x)

________________________________________________________________________________________